function setModuleCssRule(type, isProd) {
    if (type === 'css' && isProd) {
        return [
            {
                loader:'style-loader'
            },
            {
                loader: 'css-loader',
                options: {
                    importLoaders: 2,
                    modules: true
                }
            },
            {
                loader: 'postcss-loader'
            }
        ];
    } else if (type ==='scss' && isProd) {
        return [
            {
                loader:'style-loader'
            },
            {
                loader:'sass-loader',
                options: {
                    implementation: require('sass')
                }
            },
            {
                loader: 'css-loader',
                options: {
                    importLoaders: 2,
                    modules: true
                }
            },
            {
                loader: 'postcss-loader'
            }
        ];
    } else if (type === 'css' &&!isProd) {
        return [
            {
                loader:'style-loader'
            },
            {
                loader: 'css-loader',
                options: {
                    importLoaders: 1,
                    modules: true
                }
            }
        ];
    } else if (type ==='scss' &&!isProd) {
        return [
            {
                loader:'style-loader'
            },
            {
                loader:'sass-loader',
                options: {
                    implementation: require('sass')
                }
            },
            {
                loader: 'css-loader',
                options: {
                    importLoaders: 2,
                    modules: true
                }
            }
        ];
    }
}
module.exports = setModuleCssRule;
